/**
 * Copyright 2020 Vercel Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

.wrapper {
  color: var(--secondary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  animation-delay: 2.6s;
  flex-direction: column;
}

:global(.ticket-generated) .wrapper {
  animation-delay: 1.2s;
}

.label {
  width: 100%;
  margin-bottom: var(--space-2x);
}

.label-wrapper {
  display: flex;
  align-items: center;
  max-width: 400px;
  width: 100%;
  justify-content: space-between;
}

@media (min-width: 768px) {
  .wrapper {
    flex-direction: row;
  }

  .label {
    width: auto;
    margin-right: 10px;
    margin-bottom: 0px;
  }

  .label-wrapper {
    width: auto;
  }
}

.field {
  position: relative;
  border-radius: var(--space-2x);
  overflow: hidden;
  background: var(--gray);
}

@media (min-width: 768px) {
  .field {
    padding-right: 50px;
  }
  .field.desktop-copy-disabled {
    padding-right: 0px;
  }
}

.mobile-copy {
  margin-bottom: 10px;
  display: flex;
}

.mobile-copy-disabled.mobile-copy-disabled {
  display: none;
}

.mobile-copy * {
  color: var(--secondary-color);
  transition: color 0.2s ease;
}

.mobile-copy:hover * {
  color: #fff;
  transition: color 0.2s ease;
}

.field * {
  color: var(--secondary-color);
  transition: color 0.2s ease;
}

.field:hover * {
  color: #fff;
  transition: color 0.2s ease;
}

.url {
  width: calc(100vw - 36px);
  user-select: all;
  overflow-x: scroll;
  white-space: nowrap;
  display: block;

  padding: var(--space-2x) 14px;
  -ms-overflow-style: none; /* IE and Edge */
  scrollbar-width: none; /* Firefox */
}

@media (min-width: 436px) {
  .url {
    width: 400px;
  }
}

@media (min-width: 768px) {
  .url {
    width: 400px;
  }
  .mobile-copy {
    margin-bottom: 0;
    display: none;
  }
}

.url::-webkit-scrollbar {
  display: none;
}

.fade {
  position: absolute;
  background: linear-gradient(90deg, rgba(37, 39, 41, 0%) 0%, #252729 100%);
  top: 0;
  bottom: 0;
  right: 0px;
  width: 50px;
  z-index: 1;
  display: block;
  border-radius: var(--space-2x);
  pointer-events: none;
}

.desktop-copy.desktop-copy-disabled {
  display: none;
}

@media (min-width: 768px) {
  .fade {
    right: 50px;
  }
  .fade.desktop-copy-disabled {
    right: 0px;
  }
}

.copied {
  display: flex;
  z-index: 2;
  align-items: center;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.2s ease !important;
}

.copied.visible {
  opacity: 1;
}

.copy-button {
  background: none;
  outline: none;
  border: none;
  cursor: pointer;
  z-index: 2;
  border-radius: var(--space-2x);
  width: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: -10px;
}

@media (min-width: 768px) {
  .copied {
    position: absolute;
    right: 50px;
    top: 0px;
    bottom: 0px;
    background: linear-gradient(90deg, rgba(37, 39, 41, 0%) 0px, #252729 40px);
    padding-left: 50px;
  }
  .copy-button {
    position: absolute;
    top: 0px;
    right: 0px;
    bottom: 0px;
    margin-right: 0px;
    width: 50px;
  }
}
